<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE>
<html>
<head>
<meta charset="utf-8">
<title>分享知识</title>
<script type="text/javascript" src="jquery-1.7.1.js"></script>
<script charset="utf-8" src="common/component/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="common/component/kindeditor/lang/zh_CN.js"></script>
<style type="text/css">

	body {
		margin: 0;
		text-align: center;
	}
	
	#mainDiv {
		margin-left: auto;
		margin-right: auto;
		width: 1000px;
		min-width: 1000px;
		text-align: left;
		padding-left: 300px; 
	}
	
	#content {
		margin-top: 30px;
		border: 1px solid gray;
		min-height: 450px;
		width: 700px;
	}
	
	#submitBtn {
		padding-top: 10px;
		height: 30px;
		width: 700px;
		background-color: #3DCFFF;
		cursor: pointer;
		font-weight: bold;
		text-align: center;
	}
	
	#submitBtn:HOVER {
		background-color: #00BFFF;
	}

</style>
</head>
<body>

	<div id="mainDiv">
		<div style="margin-top: 20px;">
			标题：<input id="title" style="height:30px; width: 660px;"/>
		</div>
		<br/>
		<div>
			<input type="hidden" id="typeId" />
			所属分类：<input id="typeName" style="width: 200px; height: 20px;"/>&nbsp;<img src="images/add.png" style="cursor: pointer;" onclick="addShareType();"/>&nbsp;<img src="images/search.png" style="cursor: pointer;"/>
		</div>
		<br/>
		<div>
			<div id="content"><p>这里填写分享内容</p></div>
		</div> 
		<br/>
		<div>
			<div id="submitBtn">提　　　交</div>
		</div>
	</div>
	
</body>
<script type="text/javascript">

	$(document).ready(function() {
		$("#bg").width(window.innerWidth);
		$("#bg").height(window.innerHeight);
		
		KindEditor.ready(function(K) {
			var options = {
					resizeType: 0
			};
            window.editor = K.create('#content', options);
  		});
	});
	
	function addShareType() {
		openwindow('shareTypeAdd.jsp', '知识分类新增', 500, 500);
	}
	
	function openwindow(url, name, iWidth, iHeight) {
		var url; //转向网页的地址;
		var name; //网页名称，可为空;
		var iWidth; //弹出窗口的宽度;
		var iHeight; //弹出窗口的高度;
		var iTop = (window.screen.availHeight-30-iHeight)/2; //获得窗口的垂直位置;
		var iLeft = (window.screen.availWidth-10-iWidth)/2; //获得窗口的水平位置;
		window.open(url,name,'height='+iHeight+',,innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
	}

</script>
</html>